﻿/**	dancer.h
 *	----	Create Time Stamp	--2007-06-11 23:25:12--
 *------------------------------------------------------------------------------
 *	Mean	:
 *	Author	:Nick Shallery	(nicknide@gmail.com)
 *	Version	:1.0.4.5	(2009-03-01 17:17:15)
 *------------------------------------------------------------------------------
**/	/*YOU HAVE ALL LEFT WITH THIS CODE WHILE YOU KEEP COMMENT IN EVERY COPY.*/

#if			!defined(__LOLIX__SOLA__DANCER__NICK__K_IN_G__)
#define		__LOLIX__SOLA__DANCER__NICK__K_IN_G__
//==============================================================================
//--------------------------------------------------------------------------

#if			!defined(__LOLIX__LOLI_X_CFG__K_IN_G__)
	#include	"../lolix_cfg.h"
#endif	//	!defined(__LOLIX__LOLI_X_CFG__K_IN_G__)



#if			!defined(__LOLIX__LOLIX_TYPE__K_IN_G__)
	#include	"../lolix_type.h"
#endif	//	!defined(__LOLIX__LOLIX_TYPE__K_IN_G__)
#if			!defined(__LOLIX__TOY__REBIND_TYPE__K_IN_G__)
	#include	"../toy/rebind_type.hpp"
#endif	//	!defined(__LOLIX__TOY__REBIND_TYPE__K_IN_G__)
#if			!defined(__LOLIX__SOLA__MATRIX__K_IN_G__)
	#include	"./matrix.h"
#endif	//	!defined(__LOLIX__SOLA__MATRIX__K_IN_G__)
#if			!defined(__LOLIX__SOLA__VECTOR__NICK__K_IN_G__)
	#include	"./vector.h"
#endif	//	!defined(__LOLIX__SOLA__VECTOR__NICK__K_IN_G__)


namespace lolix{namespace sola{
	class	LOLIX_NO_VTABLE	spirit
		: public itf
	{
	public:
		LOLIX_DECLARE_ITF(lolix::sola::spirit, lolix::itf, (0x24e0ddfc, 0x90db4843, 0x8220cb67, 0xe321ddb1));
		LOLIX_INTERFACE(get_pos	, LOLIX_RETNV	, (sola::dvec3* v3)const);
		LOLIX_INTERFACE(move_to	, LOLIX_RETNV	, (const sola::dvec3* vec));
	};

	class	LOLIX_NO_VTABLE	dancer
		: public spirit
	{
	public:
		LOLIX_DECLARE_ITF(lolix::sola::dancer, lolix::sola::spirit, (0xf25b014f, 0x988d41bd, 0x8ea00f2e, 0x1da50747));
		LOLIX_DEFINE_FACTORY((0x3791a36c, 0xd3b04a94, 0xa5be5462, 0x92543343), (dancer**));
		LOLIX_INTERFACE(set_dmat		, LOLIX_RETNV	, (const sola::dmat4* in_mt, bool right));
		LOLIX_INTERFACE(get_dmat		, LOLIX_RETNV	, (const sola::dmat4** out_mt, bool* right)const);
		LOLIX_INTERFACE(get_view_dmat	, LOLIX_RETNV	, (sola::dmat4*, bool* right)const);

		LOLIX_INTERFACE(look_at			, LOLIX_RETNV	, (const double pos[3], const double tgr[3], const double top[3]));

		LOLIX_INTERFACE(turn_direct		, LOLIX_RETNV	, (const sola::dvec4* vec));
		//	v.x = right, v.y = top, v.z = back;
		LOLIX_INTERFACE(shift			, LOLIX_RETNV	, (const sola::dvec3* vec));
		//	tgr	: 世界坐标中的一个东西
		//	sft	:	本地坐标需要做的操作
		//	类似 shift, 所不同的是 操作先转换到 ogl:(-z):sft->tgr d3d:(z):sft->tgr 的坐标空间中进行
		LOLIX_INTERFACE(shift_to_tgr	, LOLIX_RETNV	, (const sola::dvec3* sft, const sola::dvec3* tgr));
	};
}}


SYS_REGIST_TYPE(lolix::sola::spirit);
SYS_REGIST_TYPE(lolix::sola::dancer);
SYS_REGIST_TYPE(lolix::sola::dancer::factory_type);
//--------------------------------------------------------------------------
//==============================================================================
#endif	//	!defined(__LOLIX__SOLA__DANCER__NICK__K_IN_G__)
